using System.Windows;

namespace Synergy.Windows
{
	/// <summary>
	/// Contains state information and event data associated with a routed event for a changed value of type 
	/// <typeparamref name="T"/>.
	/// </summary>
	/// <typeparam name="T">Type of the value that changed.</typeparam>
	/// <remarks>
	///		<list type="table">
	///			<listheader><term>Version</term><description>Description</description></listheader>
	///			<item>
	///				<term>1.0</term>
	///				<description>Initial version</description>
	///			</item>
	///		</list>
	/// </remarks>
	public class ValueChangedRoutedEventArgs<T> : RoutedEventArgs
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="ValueChangedRoutedEventArgs&lt;T&gt;"/> class.
		/// </summary>
		public ValueChangedRoutedEventArgs()
		{}


		/// <summary>
		/// Initializes a new instance of the <see cref="ValueChangedRoutedEventArgs&lt;T&gt;"/> class.
		/// </summary>
		/// <param name="routedEvent">The routed event.</param>
		public ValueChangedRoutedEventArgs(RoutedEvent routedEvent) : base(routedEvent)
		{}


		/// <summary>
		/// Initializes a new instance of the <see cref="ValueChangedRoutedEventArgs&lt;T&gt;"/> class.
		/// </summary>
		/// <param name="routedEvent">The routed event identifier for this instance of the <see cref="T:System.Windows.RoutedEventArgs"/> class.</param>
		/// <param name="source">An alternate source that will be reported when the event is handled. This pre-populates the <see cref="P:System.Windows.RoutedEventArgs.Source"/> property.</param>
		public ValueChangedRoutedEventArgs(RoutedEvent routedEvent, object source) : base(routedEvent, source)
		{}


		/// <summary>
		/// Gets or sets the old value.
		/// </summary>
		/// <value>The old value.</value>
		public T OldValue { get; set; }


		/// <summary>
		/// Gets or sets the new value.
		/// </summary>
		/// <value>The new value.</value>
		public T NewValue { get; set; }
	}
}